﻿Public Class Resources

    Public Shared Function RetornarTituloChampion(ByVal strChampion As String) As String

        Return Convert.ToString(My.Resources.Titulos.ResourceManager.GetObject(strChampion, Threading.Thread.CurrentThread.CurrentCulture))

    End Function

    Public Shared Function RetornarImagemChampion(ByVal strChampion As String) As String 'System.Drawing.Image

        'Return CType(My.Resources.Imagens.ResourceManager.GetObject(String.Format("{0}_Square_0", strChampion)), System.Drawing.Image)

        Dim strCaminhoImagem As String = String.Format("Imagens\SquareChampions\{0}_Square_0.png", strChampion)

        Dim booEncontrou As Boolean = True

        While booEncontrou

            If System.IO.File.Exists(strCaminhoImagem) Then

                booEncontrou = False

            Else

                strCaminhoImagem = "..\" & strCaminhoImagem

            End If

        End While

        Return strCaminhoImagem

    End Function

    Public Shared Function RetornarTextos(ByVal strChave As String) As String

        Return Convert.ToString(My.Resources.Textos.ResourceManager.GetObject(strChave, Threading.Thread.CurrentThread.CurrentCulture))

    End Function

End Class
